@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
    --bg: #F5F5F4;
    --surface: #FAFAF9;
    --text: #1A1A1A;
    --text-muted: #6B6B6B;
    --accent: #0051FF;
}

[data-theme="dark"] {
    --bg: #151515;
    --surface: #1F1F1F;
    --text: #E5E5E5;
    --text-muted: #8B8B8B;
    --accent: #4B7BFF;
}

::selection {
    background: var(--accent);
    color: white;
}

/* Custom Cursor - Smooth tracking dot */
.cursor-dot {
    position: fixed;
    width: 12px;
    height: 12px;
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
}

.cursor-dot.hover {
    width: 24px;
    height: 24px;
    background: rgba(75, 123, 255, 0.1);
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) transparent;
}

/* Custom Scrollbar - Webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
    opacity: 0.5;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 30px 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

[data-theme="dark"] header {
    background: rgba(21, 21, 21, 0.85);
}

[data-theme="light"] header {
    background: rgba(245, 245, 244, 0.85);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateX(4px);
}

.nav-menu {
    display: flex;
    gap: 48px;
    align-items: center;
}

.nav-item {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Theme Toggle - Sun/Moon Icons */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.theme-toggle:hover {
    transform: rotate(180deg);
}

.theme-icon {
    width: 20px;
    height: 20px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: absolute;
}

.sun-icon {
    stroke: var(--text);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0;
    transform: scale(0.6) rotate(90deg);
}

.moon-icon {
    fill: var(--text);
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

[data-theme="light"] .sun-icon {
    opacity: 0;
    transform: scale(0.6) rotate(90deg);
}

[data-theme="light"] .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 0;
    transform: scale(0.6) rotate(-90deg);
}

/* Page Container */
.page {
    padding-top: 120px;
    min-height: 100vh;
    animation: pageIn 0.8s ease;
}

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

/* Landing Page */
.landing {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.hero {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: var(--text-muted);
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: clamp(56px, 10vw, 120px);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 0.9;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.hero-title .word {
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-title .word:hover {
    color: var(--accent);
    transform: translateY(-4px) rotate(-2deg);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 700px;
    animation: fadeInUp 1s ease;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.hero-cta {
    margin-top: 60px;
    display: flex;
    gap: 24px;
    animation: fadeInUp 1s ease;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

.btn {
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(75, 123, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: rgba(255, 255, 255, 0.2);
}

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

/* Landing Featured Section */
.featured {
    margin-bottom: 100px;
}

.personal-intro {
    max-width: 800px;
}

.personal-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 48px;
}

.personal-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.personal-content p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-muted);
}

/* Social Section */
.social-section {
    margin-bottom: 140px;
    animation: fadeInUp 1s ease;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.social-links {
    display: flex;
    gap: 24px;
    justify-content: flex-start;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.35;
    border-radius: 12px;
    background: transparent;
}

.social-link:hover {
    opacity: 1;
    transform: translateY(-3px);
    background: var(--surface);
}

.social-link svg {
    width: 20px;
    height: 20px;
    color: var(--text);
}

/* Articles Page */
.articles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 120px;
}

.page-title {
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 60px;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.article-item {
    background: var(--bg);
    padding: 48px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
}

.article-item:hover {
    background: var(--surface);
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.article-date {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.article-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.article-excerpt {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
}

.article-read {
    display: inline-block;
    margin-top: 20px;
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
    transition: transform 0.3s ease;
}

.article-item:hover .article-read {
    transform: translateX(8px);
}

/* About Page */
.about-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 100px 120px;
}

.about-intro-section {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
}

.about-photo {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: grayscale(100%) contrast(0.85) brightness(1);
    transition: filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

.about-photo:hover {
    filter: grayscale(0%) contrast(1) brightness(1);
}

.about-title {
    font-size: clamp(56px, 7vw, 84px);
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -0.05em;
    line-height: 0.95;
    color: var(--text);
}

.about-tagline {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 60px;
    color: var(--text);
    line-height: 1.4;
    max-width: 100%;
}

.about-subtitle {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 24px;
    color: var(--text-muted);
    line-height: 1.6;
}

.about-social-top {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.about-content {
    max-width: 100%;
}

.about-section {
    margin-bottom: 80px;
}

.about-section p {
    font-size: 19px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 32px;
    text-align: justify;
    text-justify: inter-word;
}

.about-quote {
    font-size: 28px;
    line-height: 1.4;
    font-weight: 300;
    margin: 80px 180px;
    padding: 40px 0;
    color: var(--text);
    letter-spacing: -0.02em;
    text-align: center;
    font-style: italic;
}

.about-social {
    display: flex;
    gap: 20px;
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .about-social {
    border-top-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    .about-container {
        padding: 0 20px 80px;
    }

    .about-intro-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-title {
        font-size: 42px;
    }

    .about-tagline {
        font-size: 20px;
    }

    .about-quote {
        font-size: 24px;
        padding-left: 24px;
    }

    .about-section p {
        font-size: 17px;
    }
}


/* Footer */
footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    font-weight: 500;
}

/* Article Page Styles */
.article-page {
    padding-top: 140px;
    min-height: 100vh;
    animation: pageIn 0.8s ease;
    position: relative;
    z-index: 1;
}

.article-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 100px 120px;
}

.article-header {
    margin-bottom: 80px;
    text-align: center;
    position: relative;
}

.article-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    margin-bottom: 60px;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    display: inline-block;
    position: relative;
    z-index: 1;
    text-decoration: none;
}

.article-back:hover {
    color: var(--text);
    transform: translateX(-4px);
}

.article-meta-date {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 24px;
    display: block;
}

.article-display-title {
    font-size: clamp(36px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 32px;
}

.article-lead {
    font-size: 22px;
    line-height: 1.5;
    color: var(--text-muted);
    font-weight: 400;
}

.article-body {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text);
}

.article-body p {
    margin-bottom: 28px;
    text-align: justify;
    hyphens: auto;
}

.article-body h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 64px;
    margin-bottom: 28px;
    text-align: left;
}

.article-body h3 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 48px;
    margin-bottom: 20px;
    text-align: left;
}

.article-body blockquote {
    margin: 40px 0;
    padding-left: 32px;
    border-left: 3px solid var(--accent);
    font-style: italic;
    color: var(--text-muted);
}

.article-body strong {
    font-weight: 600;
    color: var(--text);
}

.article-body em {
    font-style: italic;
}

.article-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.article-body a:hover {
    border-bottom-color: var(--accent);
}

.article-footer {
    margin-top: 80px;
    text-align: center;
}

.article-end-mark {
    font-size: 24px;
    color: var(--text-muted);
    opacity: 0.3;
}

/* Email Modal */
.email-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.email-modal.active {
    display: flex;
    opacity: 1;
}

.email-modal-content {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 60px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.email-modal.active .email-modal-content {
    transform: scale(1);
}

.email-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-modal-close:hover {
    color: var(--text);
    transform: rotate(90deg);
}

.email-modal-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.email-modal-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.email-display {
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.01em;
}

.email-copy-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.email-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(75, 123, 255, 0.3);
}

.email-copy-btn.copied {
    background: #10B981;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    gap: 6px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile */
@media (max-width: 768px) {
    .cursor-dot {
        display: none;
    }

    * {
        cursor: auto !important;
    }

    body {
        overflow-x: hidden;
    }

    header {
        padding: 16px 20px;
    }

    .logo {
        font-size: 18px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-item {
        font-size: 24px !important;
        display: block !important;
    }

    .theme-toggle {
        position: relative;
    }

    .page {
        padding-top: 80px;
    }

    .landing {
        padding: 0 20px;
    }

    .hero {
        min-height: calc(100vh - 80px);
        padding: 40px 0;
    }

    .hero-badge {
        font-size: 11px;
        padding: 6px 12px;
        margin-bottom: 24px;
    }

    .hero-title {
        font-size: clamp(36px, 10vw, 56px);
        margin-bottom: 24px;
    }

    .hero-subtitle {
        font-size: 16px;
        line-height: 1.6;
    }

    .hero-cta {
        margin-top: 40px;
        flex-direction: column;
        gap: 16px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .personal-title {
        font-size: clamp(28px, 7vw, 40px);
        margin-bottom: 32px;
    }

    .personal-content p {
        font-size: 16px;
    }

    .social-links {
        gap: 16px;
        justify-content: center;
    }

    .social-section {
        margin-bottom: 80px;
    }

    /* Articles page mobile */
    .articles-container {
        padding: 0 20px 80px;
    }

    .page-title {
        font-size: clamp(36px, 8vw, 56px);
        margin-bottom: 40px;
    }

    .article-item {
        padding: 32px 20px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-excerpt {
        font-size: 15px;
    }

    /* Article page mobile */
    .article-content {
        padding: 32px 20px 80px;
    }

    .article-back {
        margin-bottom: 40px;
    }

    .article-display-title {
        font-size: clamp(28px, 6vw, 36px);
    }

    .article-lead {
        font-size: 18px;
    }

    .article-body {
        font-size: 16px;
    }

    .article-body p {
        text-align: left;
        hyphens: none;
        margin-bottom: 24px;
    }

    .article-body h2 {
        font-size: 24px;
        margin-top: 48px;
    }

    .article-body h3 {
        font-size: 20px;
        margin-top: 36px;
    }

    /* About page mobile */
    .about-container {
        padding: 0 20px 80px;
    }

    .about-intro-section {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-photo {
        order: -1;
        max-width: 300px;
        margin: 0 auto;
    }

    .about-title {
        font-size: clamp(36px, 10vw, 56px);
        margin-bottom: 20px;
    }

    .about-tagline {
        font-size: 20px;
        margin-bottom: 48px;
    }

    .about-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .about-section p {
        font-size: 16px;
        line-height: 1.7;
    }

    .about-quote {
        font-size: 22px;
        margin: 60px 20px;
        padding: 32px 0;
    }

    /* Email modal mobile */
    .email-modal-content {
        padding: 40px 24px;
        width: 95%;
    }

    .email-modal-title {
        font-size: 24px;
    }

    .email-display {
        font-size: 13px;
        padding: 16px 12px;
        word-break: break-all;
    }

    .email-copy-btn {
        width: 100%;
    }

    /* Footer mobile */
    footer {
        padding: 32px 20px;
        margin-top: 60px;
    }

}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 140px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .scroll-to-top {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(75, 123, 255, 0.3);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 768px) {
    .scroll-to-top {
        width: 44px;
        height: 44px;
        bottom: 24px;
        right: 20px;
    }

    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}
