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

:root {
    --primary-blue: #007AFF;
    --light-bg: #F2F2F7;
    --dark-text: #000000;
    --gray-text: #8E8E93;
    --screen-bg: #000000;
    --card-bg: #FFFFFF;
    --separator-color: #E5E5EA;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #F2F2F7 0%, #FFFFFF 50%, #F8F9FA 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-text);
    overflow-x: hidden;
    position: relative;
}

.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background: linear-gradient(135deg, #F2F2F7 0%, #FFFFFF 50%, #F8F9FA 100%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.1;
    animation: float 30s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #007AFF, transparent);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #34C759, transparent);
    bottom: -100px;
    right: -100px;
    animation-delay: 10s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #FF3B30, transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 20s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.container {
    width: 100%;
    max-width: 1400px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 1s ease;
}

.header-content {
    max-width: 900px;
}

.code-editor {
    background: transparent;
    margin-bottom: 20px;
    text-align: left;
    width: 600px;
    min-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 50px;
}

.code-content {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 28px;
    line-height: 1.8;
    font-weight: 500;
}

.code-line {
    line-height: 1.8;
    min-height: 1.8em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    width: 100%;
    white-space: nowrap;
}

.code-line:nth-child(n+2) {
    font-size: 20px;
}

.line-number {
    color: #8E8E93;
    font-weight: 400;
    margin-right: 20px;
    min-width: 20px;
    text-align: right;
    user-select: none;
}

.keyword {
    color: #F05138;
    font-weight: 600;
}

.variable {
    color: #1976D2;
    font-weight: 600;
}

.property {
    color: #388E3C;
    font-weight: 600;
}

.operator {
    color: #F05138;
    font-weight: 600;
}

.string {
    color: #7B1FA2;
    font-weight: 500;
}

.number {
    color: #1976D2;
    font-weight: 600;
}

.cursor {
    color: var(--dark-text);
    animation: blink 1s infinite;
    font-weight: normal;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--card-bg);
    border: 1px solid var(--separator-color);
    border-radius: 10px;
    color: var(--dark-text);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    background: var(--light-bg);
    border-color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.iphone-container {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s ease 0.3s both;
    margin-bottom: 60px;
}

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

.iphone {
    width: 390px;
    height: 844px;
    background: #1d1d1f;
    border-radius: 47px;
    padding: 8px;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 25px 50px rgba(0, 0, 0, 0.1);
    position: relative;
    transform: perspective(1000px) rotateX(1deg);
    transition: transform 0.3s ease;
}


.iphone-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.volume-buttons {
    position: absolute;
    left: -3px;
    top: 180px;
}

.volume-button {
    width: 3px;
    height: 66px;
    background: #1d1d1f;
    border-radius: 0 3px 3px 0;
    margin-bottom: 12px;
}

.power-button {
    position: absolute;
    right: -3px;
    top: 230px;
    width: 3px;
    height: 100px;
    background: #1d1d1f;
    border-radius: 3px 0 0 3px;
}

.action-button {
    position: absolute;
    left: -3px;
    top: 120px;
    width: 3px;
    height: 40px;
    background: #1d1d1f;
    border-radius: 0 3px 3px 0;
}

.dynamic-island {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 126px;
    height: 37px;
    background: #000;
    border-radius: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.dynamic-island:hover {
    width: 130px;
    height: 38px;
}

.screen {
    width: 100%;
    height: 100%;
    background: var(--screen-bg);
    border-radius: 39px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px 30px 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    z-index: 5;
    position: relative;
}

.time {
    font-variant-numeric: tabular-nums;
}

.status-icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.status-icon {
    height: 12px;
    width: auto;
}

.battery {
    margin-left: 2px;
}

.home-screen {
    flex: 1;
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #000 0%, #1C1C1E 100%);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(118, 118, 128, 0.12);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 20px;
    color: #8E8E93;
    font-size: 17px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 15px;
    padding: 10px 0;
    flex: 1;
}

.app-spacer {
    visibility: hidden;
}

.app {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.app:hover {
    transform: scale(1.05);
}

.app:active {
    transform: scale(0.95);
}

.app-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
    position: relative;
    border-radius: 13.5px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 13.5px;
}

.app-icon.placeholder {
    background: linear-gradient(135deg, #E5E5EA, #D1D1D6);
    color: #8E8E93;
    font-size: 24px;
    font-weight: 600;
}

.app-store-folder {
    position: relative;
}

.folder-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.85) !important;
    border-radius: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    padding: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.folder-mini-icon {
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.folder-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.folder-content {
    background: rgba(28, 28, 30, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 20px;
    max-width: 320px;
    width: 90%;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.folder-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.folder-apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.folder-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.folder-app:hover {
    transform: scale(1.05);
}

.folder-app-icon {
    width: 50px;
    height: 50px;
    border-radius: 11px;
    margin-bottom: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.folder-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
}

.folder-app-name {
    color: white;
    font-size: 11px;
    text-align: center;
    font-weight: 400;
}

.app-name {
    color: white;
    font-size: 13px;
    text-align: center;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.page-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 10px 0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.dot.active {
    background: rgba(255, 255, 255, 0.6);
}

.dock {
    display: flex;
    justify-content: space-around;
    background: rgba(28, 28, 30, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 12px;
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dock-app {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dock-app:hover {
    transform: scale(1.15) translateY(-8px);
}

.dock-app:active {
    transform: scale(0.95);
}

/* Fix dock icons to fill bounds completely */
.dock-app .app-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 13.5px !important;
    transform: scale(1.1) !important;
}

/* Phone icon needs extra scaling to eliminate white border */
.dock-app[data-app="phone"] .app-icon img {
    transform: scale(1.2) !important;
}


.home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 134px;
    height: 5px;
    background: white;
    border-radius: 10px;
}

.app-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F2F2F7;
    display: flex;
    flex-direction: column;
    z-index: 100;
    border-radius: 39px;
    overflow: hidden;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 20px 15px;
    background: #F2F2F7;
    border-bottom: 0.5px solid var(--separator-color);
}

.back-button {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 17px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-weight: 400;
}

.back-button:hover {
    opacity: 0.7;
}

.app-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark-text);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.app-header-space {
    width: 60px;
}

.app-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: white;
}

.app-content::-webkit-scrollbar {
    width: 6px;
}

.app-content::-webkit-scrollbar-track {
    background: transparent;
}

.app-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.project-detail {
    margin-bottom: 30px;
    animation: fadeInContent 0.5s ease;
}

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

.project-detail h3 {
    color: var(--dark-text);
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 700;
}

.project-detail h4 {
    color: var(--dark-text);
    margin: 20px 0 10px;
    font-size: 20px;
    font-weight: 600;
}

.project-detail p {
    color: #3C3C43;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 17px;
}

.project-detail ul {
    margin: 10px 0 10px 20px;
}

.project-detail a {
    color: var(--primary-blue);
    text-decoration: none;
}

.project-detail a:hover {
    text-decoration: underline;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tech-tag {
    background: var(--primary-blue);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.skill-category {
    margin-bottom: 30px;
}

.skill-category h4 {
    color: var(--dark-text);
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--separator-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 35px;
    animation: fadeInContent 0.5s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--primary-blue);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 1px var(--separator-color);
}

.timeline-item h4 {
    color: var(--dark-text);
    margin-bottom: 5px;
    font-size: 18px;
    font-weight: 600;
}

.timeline-item .date {
    color: var(--gray-text);
    font-size: 15px;
    margin-bottom: 10px;
}

.timeline-item p {
    color: #3C3C43;
    line-height: 1.5;
    font-size: 16px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px 10px;
    }
    
    .iphone {
        transform: scale(0.9);
        margin: -30px 0;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .social-links {
        gap: 8px;
    }
    
    .social-link {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .code-content {
        font-size: 20px;
    }
    
    .code-editor {
        width: 100%;
        min-width: auto;
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 480px) {
    .iphone {
        transform: scale(0.85);
        margin: -50px 0;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .separator {
        display: none;
    }
    
    .code-content {
        font-size: 18px;
    }
    
    .code-editor {
        width: 100%;
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .container {
        padding: 20px 5px;
    }
}

@media (min-width: 1400px) {
    .iphone {
        transform: perspective(1000px) rotateX(1deg) scale(1.05);
    }
}

/* Legal Notice Modal */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.legal-modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: #F2F2F7;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(180deg, #E8E8ED 0%, #D1D1D6 100%);
    padding: 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #B2B2B7;
    position: relative;
}

.modal-buttons {
    display: flex;
    gap: 8px;
    position: absolute;
    left: 12px;
}

.modal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
}

.close-btn {
    background: #FF5F57;
    border: 1px solid #E0443A;
}

.close-btn:hover {
    background: #E0443A;
}

.minimize-btn {
    background: #FFBD2E;
    border: 1px solid #DEA123;
}

.maximize-btn {
    background: #28CA42;
    border: 1px solid #1AAB29;
}

.modal-title {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #3C3C43;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(80vh - 50px);
    background: white;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #F2F2F7;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #C7C7CC;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #8E8E93;
}

@media (max-width: 768px) {
    .legal-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(90vh - 50px);
    }
}

/* iOS Mail App Styles */
.mail-app {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #F2F2F7;
    margin: 0;
    padding: 0;
}

/* Send button in app header */
.send-button {
    background: none;
    border: none;
    color: #007AFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.send-button:hover {
    background: rgba(0, 122, 255, 0.1);
}


.compose-fields {
    background: white;
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
    width: 100%;
    margin: 0;
}

.compose-field {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
    width: 100%;
    box-sizing: border-box;
}

.compose-field:last-child {
    border-bottom: none;
}

.compose-field label {
    width: 60px;
    font-size: 16px;
    color: #1C1C1E;
    font-weight: 400;
    flex-shrink: 0;
}

.compose-field input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #1C1C1E;
    background: transparent;
    padding: 4px 0;
    width: 100%;
}

.compose-field input[readonly] {
    color: #8E8E93;
}

.compose-field input::placeholder {
    color: #C7C7CC;
}

.compose-body {
    flex: 1;
    background: white;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
}

.compose-body textarea {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 16px;
    color: #1C1C1E;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.4;
    background: transparent;
    box-sizing: border-box;
}

.compose-body textarea::placeholder {
    color: #C7C7CC;
}

/* Mail animation styles */
.mail-compose {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: #F2F2F7;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mail-compose.show {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .mail-toolbar {
        padding: 8px 12px;
    }
    
    .compose-field {
        padding: 10px 12px;
    }
    
    .compose-body {
        padding: 12px;
    }
}