/* ═══════════════════════════════════════════════════════════════════════════
   NOEL CODES — Editorial Portfolio
   A refined, modern aesthetic with warmth and personality
   ═══════════════════════════════════════════════════════════════════════════ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────────────────────
   COLOR SYSTEM
   ───────────────────────────────────────────────────────────────────────────── */

:root {
    /* Dark theme - default | Stark, high-contrast */
    --primary: #ffffff;
    --primary-muted: #e5e5e5;
    --text: #a3a3a3;
    --text-light: #737373;
    --text-lighter: #525252;
    --bg: #000000;
    --bg-subtle: #0a0a0a;
    --bg-elevated: #171717;
    --border: #262626;
    --border-light: #404040;
    --heading: #ffffff;

    /* Accent - teal */
    --accent: #14b8a6;
    --accent-hover: #0d9488;
    --accent-subtle: rgba(20, 184, 166, 0.12);

    /* Links */
    --link: #2dd4bf;
    --link-hover: #5eead4;
    --link-underline: rgba(45, 212, 191, 0.4);

    /* Grain overlay */
    --grain-opacity: 0.025;
}

/* Light theme - pure white, stark contrast */
@media (prefers-color-scheme: light) {
    :root {
        --primary: #000000;
        --primary-muted: #171717;
        --text: #525252;
        --text-light: #737373;
        --text-lighter: #a3a3a3;
        --bg: #ffffff;
        --bg-subtle: #fafafa;
        --bg-elevated: #f5f5f5;
        --border: #e5e5e5;
        --border-light: #d4d4d4;
        --heading: #000000;

        --accent: #0d9488;
        --accent-hover: #0f766e;
        --accent-subtle: rgba(13, 148, 136, 0.08);

        --link: #0d9488;
        --link-hover: #0f766e;
        --link-underline: rgba(13, 148, 136, 0.35);

        --grain-opacity: 0.015;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   BASE & TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────────── */

html {
    font-size: 16.5px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: -0.01em;
    min-height: 100vh;
    position: relative;
}

/* Grain texture overlay for depth */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: var(--grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Selection styling */
::selection {
    background: var(--accent-subtle);
    color: var(--heading);
}

/* ─────────────────────────────────────────────────────────────────────────────
   HEADER & NAVIGATION
   ───────────────────────────────────────────────────────────────────────────── */

header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 1.25rem;
    display: flex;
    position: relative;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.navbar {
    background-color: transparent;
    width: auto;
    display: inline-flex;
    align-items: center;
}

.nav-logo {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--heading);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
}

.nav-logo:hover {
    opacity: 0.7;
}

.nav-logo p {
    margin: 0;
}

/* Oni mask logo */
.oni-mask-logo {
    height: 40px;
    width: auto;
}

/* Mobile hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity 0.2s ease;
    position: relative;
    z-index: 200;
}

.hamburger:hover {
    opacity: 0.7;
}

.hamburger span {
    height: 1.5px;
    background-color: var(--primary-muted);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger span:nth-child(1) { width: 20px; }
.hamburger span:nth-child(2) { width: 14px; }
.hamburger span:nth-child(3) { width: 17px; }

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
    display: none;
    list-style: none;
    gap: 0.5rem;
    flex-direction: column;
    padding: 4rem 2rem;
    top: -1.5rem;
    height: 100vh;
    width: 75vw;
    max-width: 280px;
    right: -1.5rem;
}

.nav-menu.active {
    display: flex;
    position: absolute;
    background-color: var(--bg-subtle);
    border-left: 1px solid var(--border);
    z-index: 100;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-link {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: color 0.2s ease;
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid transparent;
}

.nav-link:hover {
    color: var(--heading);
}

/* Desktop navigation */
@media (min-width: 640px) {
    header {
        padding: 2rem 2rem 1.5rem;
    }

    .hamburger {
        display: none;
    }

    .nav-menu {
        display: flex !important;
        flex-direction: row;
        position: static;
        background-color: transparent;
        height: auto;
        width: auto;
        border: none;
        gap: 2.5rem;
        padding: 0;
        box-shadow: none;
    }

    .nav-link {
        padding: 0;
        border-bottom: none;
        position: relative;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 1px;
        background-color: var(--accent);
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-link:hover::after {
        width: 100%;
    }

    .oni-mask-logo {
        height: 44px;
    }
}

@media (min-width: 768px) {
    header {
        padding: 2.5rem 3rem 1.75rem;
    }

    .oni-mask-logo {
        height: 48px;
    }
}

@media (min-width: 1024px) {
    .oni-mask-logo {
        height: 52px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   MAIN CONTENT CONTAINER
   ───────────────────────────────────────────────────────────────────────────── */

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CONTENT TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────────── */

.content {
    font-size: 1rem;
    line-height: 1.75;
}

.content p {
    margin-bottom: 1.25rem;
}

.content h1 {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: var(--heading);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.content h1:not(:first-child) {
    margin-top: 3rem;
}

.content h2 {
    font-family: 'Sora', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem 0;
    color: var(--heading);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.content h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem 0;
    color: var(--primary-muted);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* Links with elegant underline animation */
.content a {
    color: var(--link);
    text-decoration: none;
    background-image: linear-gradient(var(--link-underline), var(--link-underline));
    background-size: 100% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.content a:hover {
    color: var(--link-hover);
    background-size: 100% 2px;
}

/* Lists */
.content ol {
    margin-left: 1.25rem;
    margin-bottom: 1.25rem;
}

.content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.content ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
}

.content ul li::marker {
    color: var(--accent);
}

/* Blog link list - refined spacing */
.content h2 + p {
    margin-bottom: 0.75rem;
}

.content p:has(a[href*="/blogs/"]) {
    margin-bottom: 0.6rem;
    padding-left: 0;
    position: relative;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE TYPOGRAPHY SCALING
   ───────────────────────────────────────────────────────────────────────────── */

/* Tablet (640px) */
@media (min-width: 640px) {
    .container {
        padding: 2.5rem 2rem 5rem;
    }

    .content h1 {
        font-size: 2.15rem;
    }

    .content h2 {
        font-size: 1.4rem;
    }

    .content h3 {
        font-size: 1.2rem;
    }
}

/* Medium devices (768px) */
@media (min-width: 768px) {
    .container {
        padding: 3rem 2.5rem 6rem;
    }

    .content h1 {
        font-size: 2.35rem;
    }

    .content h2 {
        font-size: 1.5rem;
        margin: 2.75rem 0 1rem 0;
    }

    .content h3 {
        font-size: 1.25rem;
    }
}

/* Large devices (1024px) */
@media (min-width: 1024px) {
    .container {
        max-width: 680px;
        padding: 3.5rem 2rem 6rem;
    }

    .content h1 {
        font-size: 2.5rem;
    }

    .content h2 {
        font-size: 1.6rem;
    }

    .content h3 {
        font-size: 1.3rem;
    }
}

/* Extra large devices (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 700px;
        padding: 4rem 2rem 7rem;
    }

    .content {
        font-size: 1.05rem;
    }

    .content h1 {
        font-size: 2.65rem;
    }

    .content h2 {
        font-size: 1.65rem;
    }

    .content h3 {
        font-size: 1.35rem;
    }
}

/* Ultra-wide (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 720px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   SUBTLE ANIMATIONS
   ───────────────────────────────────────────────────────────────────────────── */

/* Fade in content on load */
main {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth focus states */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SCROLLBAR STYLING (Webkit browsers)
   ───────────────────────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-lighter);
}
