* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.15);
    --border-color: rgba(255, 255, 255, 0.08);
    --hover-glow: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    cursor: none;
    touch-action: pan-y;
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.loader-circle {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: loaderSpin 1s linear infinite;
}

.loader-text {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
    animation: loaderPulse 2s ease-in-out infinite;
}

@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    z-index: 10001;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: difference;
}

.cursor-trail.active {
    opacity: 1;
}

/* Cursor */
.cursor-follower {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.4s ease,
                opacity 0.3s ease;
    display: none;
    mix-blend-mode: difference;
}

.cursor-follower.active {
    width: 80px;
    height: 80px;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

/* Morphing Blobs */
.morphing-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.4;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: blobMorph 20s ease-in-out infinite;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    top: 60%;
    right: 15%;
    animation-delay: 7s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    bottom: 20%;
    left: 50%;
    animation-delay: 14s;
}

@keyframes blobMorph {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        transform: translate(-30px, 30px) scale(0.9);
        border-radius: 70% 30% 50% 50% / 30% 50% 70% 50%;
    }
    75% {
        transform: translate(30px, 50px) scale(1.05);
        border-radius: 40% 60% 30% 60% / 60% 40% 60% 30%;
    }
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
    mix-blend-mode: overlay;
}

/* Background */
.background-gradient {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: gradientFloat 25s ease-in-out infinite;
    will-change: transform;
}

@keyframes gradientFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(2%, -2%) scale(1.05);
    }
    66% {
        transform: translate(-2%, 2%) scale(0.95);
    }
}

/* Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 20s infinite linear;
    opacity: 0;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px 100px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 50px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 0;
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    order: 1;
}

.profile-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
}

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    z-index: 3;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 40px rgba(255, 255, 255, 0.02);
    animation: profileFloat 6s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-image-inner {
    width: 100%;
    height: 100%;
    background: url('images/deniz.png') center center / cover no-repeat;
    border-radius: 50%;
    filter: grayscale(20%) contrast(1.1) brightness(1.05);
    transition: filter 0.4s ease;
}

.profile-image:hover .profile-image-inner {
    filter: grayscale(0%) contrast(1.2) brightness(1.1);
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    animation: glowPulse 4s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.profile-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 2;
    animation: ringRotate 20s linear infinite;
    pointer-events: none;
}

.profile-ring::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes profileFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

@keyframes ringRotate {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 56px;
    font-weight: 600;
    letter-spacing: -2px;
    margin-bottom: 12px;
    line-height: 1.1;
    text-align: center;
}

.name-line {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
}

.name-line .letter {
    display: inline-block;
    opacity: 1 !important; /* Always visible as fallback */
    transform: translateY(0);
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Animation will be handled by GSAP, CSS is just fallback */
}

.name-line .letter-space {
    display: inline-block;
    width: 0.2em;
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    margin-top: 8px;
}

.subtitle-word {
    position: relative;
    display: inline-block;
}

.subtitle-word::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-secondary);
    transition: width 0.6s ease;
}

.subtitle-word:hover::after {
    width: 100%;
}

/* Links Container */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 0;
    width: 100%;
    flex-shrink: 0;
    order: 2;
}

/* Link Item */
.link-item {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    opacity: 1 !important;
    visibility: visible !important;
    will-change: transform;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.link-item:hover::before,
.link-item:active::before {
    opacity: 1;
}

.link-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.link-item:hover .link-bg-pattern {
    opacity: 1;
}

.link-item:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.1),
        0 0 80px rgba(255, 255, 255, 0.05);
}

.link-item:active {
    transform: translateY(-2px) scale(0.99);
    transition: all 0.2s ease;
}

.link-hover-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.8s ease;
    opacity: 0;
    pointer-events: none;
}

.link-item:hover .link-hover-effect {
    width: 400px;
    height: 400px;
    opacity: 1;
}

.link-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    pointer-events: none;
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.link-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.link-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.link-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 26px;
    color: var(--text-primary);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.link-icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.link-item:hover .link-icon {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.1) rotate(8deg);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.1);
}

.link-item:hover .link-icon-glow {
    opacity: 1;
}

.link-text {
    flex: 1;
    min-width: 0;
}

.link-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.link-item:hover .link-title {
    transform: translateX(4px);
}

.link-description {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 300;
    transition: color 0.3s ease;
    line-height: 1.5;
}

.link-item:hover .link-description {
    color: rgba(255, 255, 255, 0.85);
}

.link-arrow-wrapper {
    flex-shrink: 0;
    position: relative;
}

.link-arrow {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    color: var(--text-secondary);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.link-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.link-item:hover .link-arrow {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    transform: translateX(6px);
}

.link-item:hover .link-arrow::before {
    left: 100%;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    position: absolute;
    bottom: 20px;
    left: 24px;
    right: 24px;
    width: calc(100% - 48px);
    flex-shrink: 0;
    order: 3;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.footer-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

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

/* Selection */
::selection {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    body {
        cursor: default;
    }

    .cursor-follower,
    .cursor-trail {
        display: none !important;
    }
    
    .morphing-blobs {
        opacity: 0.2;
    }
    
    .blob {
        filter: blur(80px);
    }

    .container {
        padding: 24px 16px 80px;
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
    }

    .header {
        margin-bottom: 0;
    }

    .profile-image-wrapper {
        margin-bottom: 16px;
    }

    .profile-image {
        width: 100px;
        height: 100px;
    }

    .profile-glow {
        width: 120px;
        height: 120px;
    }

    .profile-ring {
        width: 110px;
        height: 110px;
    }

    .name {
        font-size: 36px;
        letter-spacing: -1.5px;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 11px;
        letter-spacing: 2px;
        margin-top: 4px;
    }

    .links-container {
        gap: 10px;
        margin-bottom: 0;
        width: 100%;
        flex-shrink: 0;
    }

    .link-item {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .link-item:active {
        transform: scale(0.98);
    }

    .link-content {
        gap: 14px;
    }

    .link-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
        border-radius: 12px;
    }

    .link-title {
        font-size: 18px;
    }

    .link-description {
        font-size: 12px;
    }

    .link-arrow {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .link-item:hover {
        transform: translateY(-4px) scale(1.005);
    }

    .footer {
        padding-top: 20px;
        bottom: 16px;
        left: 16px;
        right: 16px;
        width: calc(100% - 32px);
    }

    .footer-text {
        font-size: 10px;
    }

    .background-gradient {
        animation-duration: 30s;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 12px 60px;
        min-height: 100vh;
        min-height: 100dvh;
        justify-content: center;
        gap: 32px;
    }

    .header {
        margin-bottom: 0;
    }

    .profile-image-wrapper {
        margin-bottom: 12px;
    }

    .profile-image {
        width: 90px;
        height: 90px;
    }

    .profile-glow {
        width: 110px;
        height: 110px;
    }

    .profile-ring {
        width: 100px;
        height: 100px;
    }

    .name {
        font-size: 32px;
        letter-spacing: -1px;
        margin-bottom: 6px;
    }

    .subtitle {
        font-size: 10px;
        letter-spacing: 1.5px;
        margin-top: 2px;
    }

    .links-container {
        gap: 8px;
        margin-bottom: 0;
        width: 100%;
        flex-shrink: 0;
    }

    .link-item {
        padding: 16px 14px;
        border-radius: 14px;
    }

    .link-content {
        gap: 12px;
    }

    .link-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
        border-radius: 10px;
    }

    .link-title {
        font-size: 17px;
    }

    .link-description {
        font-size: 11px;
    }

    .link-arrow {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }

    .footer {
        padding-top: 16px;
        bottom: 12px;
        left: 12px;
        right: 12px;
        width: calc(100% - 24px);
    }

    .footer-text {
        font-size: 9px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .link-item:hover {
        transform: none;
    }

    .link-item:active {
        transform: scale(0.97);
        background: rgba(255, 255, 255, 0.06);
    }

    .link-item:active .link-icon {
        transform: scale(1.05) rotate(5deg);
    }

    .link-item:active .link-arrow {
        transform: translateX(3px);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
